package com.eco.fanliapp.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.eco.fanliapp.common.response.ServerResponse;
import com.eco.fanliapp.entity.AppUser;
import com.eco.fanliapp.entity.AppWithdrawal;
import com.eco.fanliapp.entity.SyUserMoney;
import com.eco.fanliapp.vo.wechat.menu.Menu;
import org.apache.http.ParseException;

import java.io.IOException;

public interface IAppWxWithdrawalService{

    /**
     * 删除菜单
     * @param accessToken
     * @return
     * @throws Exception
     */
    ServerResponse deleteMenu(String accessToken) throws Exception;

    /**
     * 查询菜单数据
     * @param accessToken
     * @return
     * @throws Exception
     */
    ServerResponse getMenu(String accessToken) throws Exception;
    /**
     * 创建菜单
     * @param menu
     * @param accessToken
     * @return
     * @throws Exception
     */
    ServerResponse createMenu(Menu menu, String accessToken) throws Exception;
    /**
     * 获取accessToken
     * @return
     */
    String getAccessToken() throws IOException;
    /**
     * 微信提现
     * @return
     */
    ServerResponse toGet(String amount, Long userId,Integer type) throws Exception;

    /**
     * 提现规则
     * @return
     * @param userId
     */
    ServerResponse rules(Long userId);


    /**
     * 查询企业付款订单
     * @return
     */
    ServerResponse gettransferinfo();




    /**
     * 提现记录
     * @param userId
     * @param withdrawalType
     * @return
     */
    ServerResponse appWithdrawalList(int currentPage, int pageSize, Long userId, Integer withdrawalType);

    /**
     * 发送模板消息
     *
     * @param messageType
     * @param keyword1Param
     * @param keyword2Param
     * @param keyword3Param
     * @param keyword4Param
     * @return
     */
    ServerResponse<String> sendCashMessage(AppUser appUser, String messageType, String keyword1Param, String keyword2Param, String keyword3Param, String keyword4Param) throws ParseException, IOException;

    /**
     * 生成提现日志
     * @param u
     * @param amount
     * @param i
     * @param result
     * @param message
     * @return
     */
    int addLogAppWithdrawal(AppUser u, String amount, int i,  String result, String message);

    /**
     * 公众号提现及通知
     * @param openId
     * @return
     */
    String getResponseMessage(String toUserName, String openId,String msgId) throws Exception;
}
